<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="utf-8" />
		<title>HTML Preview (markdown to html) - Editor.md examples</title>
		<link rel="stylesheet" href="assets/lib/editor.md-master/css/editormd.preview.css" />
		<link rel="stylesheet" type="text/css" href="assets/lib/bootstrap3.3.7/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="css/style.css"/>
	</head>
	<body>
		<div class="container-fluid">
			<h2>222222222222</h2>
			<hr />
			<div class="row mdBox">
				<div id="toc2" class="right">
				</div>
				<div id="content2" class="left">
					<textarea style="display:none;" name="test-editormd-markdown-doc">###Hello world!</textarea>
				</div>
			</div>
			<hr />
			<h2>44444444444444444444444444</h2>
		</div>
		<script src="js/jquery.js"></script>
		<script src="assets/lib/bootstrap3.3.7/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
		<script src="assets/lib/editor.md-master/lib/marked.min.js"></script>
		<script src="assets/lib/editor.md-master/lib/prettify.min.js"></script>
		<script src="assets/lib/editor.md-master/lib/raphael.min.js"></script>
		<script src="assets/lib/editor.md-master/lib/underscore.min.js"></script>
		<script src="assets/lib/editor.md-master/lib/sequence-diagram.min.js"></script>
		<script src="assets/lib/editor.md-master/lib/flowchart.min.js"></script>
		<script src="assets/lib/editor.md-master/lib/jquery.flowchart.min.js"></script>
		<script src="assets/lib/editor.md-master/editormd.js"></script>
		<script>
			$(function() {

				var testEditormdView, testEditormdView2;

				$.get("test.md", function(markdown) {
					// test-editormd-view  custom-toc-container
					testEditormdView = editormd.markdownToHTML("content2", {
						markdown: markdown, //+ "\r\n" + $("#append-test").text(),
						//htmlDecode      : true,       // 开启 HTML 标签解析，为了安全性，默认不开启
						htmlDecode: "style,script,iframe", // you can filter tags decode
						//toc             : false,
						tocm: true, // Using [TOCM]
						tocContainer: "#toc2", // 自定义 ToC 容器层
						//gfm             : false,
						//tocDropdown     : true,
						// markdownSourceCode : true, // 是否保留 Markdown 源码，即是否删除保存源码的 Textarea 标签
						emoji: true,
						taskList: true,
						tex: true, // 默认不解析
						flowChart: true, // 默认不解析
						sequenceDiagram: true, // 默认不解析
					});

					//console.log("返回一个 jQuery 实例 =>", testEditormdView);

					// 获取Markdown源码
					//console.log(testEditormdView.getMarkdown());

					//alert(testEditormdView.getMarkdown());
				});


			});
		</script>
	</body>
</html>
